import type { PlusColumn } from 'plus-pro-components'

import { useExportStatistics, usePageInfo } from '@fl/api/fangjiaohui'

export function useForm(vm: any) {
    const schema: PlusColumn[] = [
        {
            colProps: {
                span: 6,
            },
            label: '项目名称',
            prop: 'name',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '收货人',
            prop: 'name',
            valueType: 'copy',
        },
        {
            colProps: {
                span: 6,
            },
            label: '收货人电话',
            prop: 'name',
            valueType: 'copy',
        },
    ] as const

    const state = {
        name: '',
    }
    const form = ref({
        ...state,
    })

    function reset() {
        form.value = {
            ...state,
        }
        vm.exposed.getData()
    }

    return { form, reset, schema, state }
}
